﻿seajs.config({
    base: './js/',
    alias: {
        'labjs': 'lib/LAB.min',
    }
});

define(function (require) {
    require('labjs');

    // 载入基础lib
    $LAB.script('js/lib/jquery-1.6.1.min.js')
        .script('js/lib/jquery.mobile-1.0b2.js')
        .script('js/lib/underscore-min.js').wait()
        .script('js/lib/backbone.min.js').wait(
            function () {
                $(function () {
                    
                    $('#div1').bind ('swipeleft', function (e) {
                          $.mobile.changePage('#div2');
                    });
                    $('#div2').bind ('swiperight', function (e) {
                          $.mobile.changePage('#div1', {
                            reverse: true
                          });
                    });    
                });

            }
        )
});
